package com.xzg.user.controller;

import javax.swing.text.html.parser.Entity;
import java.text.CollationKey;
import java.text.Collator;
import java.util.*;

class User implements Comparable<User>, List<User> {
    private String name;

    private Long id;

    private Comparator<Object> com = Collator.getInstance(Locale.CHINA);

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Comparator<Object> getCom() {
        return com;
    }

    public void setCom(Comparator<Object> com) {
        this.com = com;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    @Override
    public int compareTo(User user) {
        return com.compare(this.getName(),user.getName());
    }

    @Override
    public int size() {
        return 0;
    }

    @Override
    public boolean isEmpty() {
        return false;
    }

    @Override
    public boolean contains(Object o) {
        return false;
    }

    @Override
    public Iterator<User> iterator() {
        return null;
    }

    @Override
    public Object[] toArray() {
        return new Object[0];
    }

    @Override
    public <T1> T1[] toArray(T1[] a) {
        return null;
    }

    @Override
    public boolean add(User user) {
        return false;
    }

    @Override
    public boolean remove(Object o) {
        return false;
    }

    @Override
    public boolean containsAll(Collection<?> c) {
        return false;
    }

    @Override
    public boolean addAll(Collection<? extends User> c) {
        return false;
    }

    @Override
    public boolean addAll(int index, Collection<? extends User> c) {
        return false;
    }


    @Override
    public boolean removeAll(Collection<?> c) {
        return false;
    }

    @Override
    public boolean retainAll(Collection<?> c) {
        return false;
    }

    @Override
    public void clear() {

    }

    @Override
    public User get(int index) {
        return null;
    }

    @Override
    public User set(int index, User element) {
        return null;
    }

    @Override
    public void add(int index, User element) {

    }


    @Override
    public User remove(int index) {
        return null;
    }

    @Override
    public int indexOf(Object o) {
        return 0;
    }

    @Override
    public int lastIndexOf(Object o) {
        return 0;
    }

    @Override
    public ListIterator<User> listIterator() {
        return null;
    }

    @Override
    public ListIterator<User> listIterator(int index) {
        return null;
    }

    @Override
    public List<User> subList(int fromIndex, int toIndex) {
        return null;
    }
}

public class Test2 {

    public static void main(String[] args) {
//        Map<Long,String> map = new HashMap<>();
//        map.put(1l,"小小");
//        map.put(2l,"安卓");
//        map.put(3l,"叶子");
//        map.put(4l,"逼测");
//        Comparator<Map.Entry<Long,String>> valueComparator = new Comparator<Map.Entry<Long, String>>() {
//            @Override
//            public int compare(Map.Entry<Long, String> o1, Map.Entry<Long, String> o2) {
//                return o1.getValue().compareTo(o2.getValue());
//            }
//        };
//        List<Map.Entry<Long,String>> list = new ArrayList<Map.Entry<Long,String>>(map.entrySet());
//        Collections.sort(list,valueComparator);
//        System.out.println("______________________");
//        for(Map.Entry<Long,String> entry : list) {
//            System.out.println(entry.getKey()+":"+entry.getValue());
//        }
    }
}
